package com.yytek.upgrade.service;

import java.util.List;

import com.yytek.upgrade.domain.UpgradeFirmware;
import com.yytek.upgrade.domain.UpgradeStrategy;
import com.yytek.upgrade.dto.UpgeadeStrategyDevice;

/**
 * 升级策略Service接口
 * 
 * @author yytek-iot
 * @date 2022-09-06
 */
public interface IUpgradeStrategyService 
{
    /**
     * 查询升级策略
     * 
     * @param id 升级策略主键
     * @return 升级策略
     */
    public UpgradeStrategy selectUpgradeStrategyById(Long id);

    /**
     * 查询升级策略列表
     * 
     * @param upgradeStrategy 升级策略
     * @return 升级策略集合
     */
    public List<UpgradeStrategy> selectUpgradeStrategyList(UpgradeStrategy upgradeStrategy);

    /**
     * 新增升级策略
     * 
     * @param upgradeStrategy 升级策略
     * @return 结果
     */
    public int insertUpgradeStrategy(UpgradeStrategy upgradeStrategy);

    /**
     * 修改升级策略
     * 
     * @param upgradeStrategy 升级策略
     * @return 结果
     */
    public int updateUpgradeStrategy(UpgradeStrategy upgradeStrategy);

    /**
     * 批量删除升级策略
     * 
     * @param ids 需要删除的升级策略主键集合
     * @return 结果
     */
    public int deleteUpgradeStrategyByIds(Long[] ids);

    /**
     * 删除升级策略信息
     * 
     * @param id 升级策略主键
     * @return 结果
     */
    public int deleteUpgradeStrategyById(Long id);

    /**
     * 新增升级策略和绑定设备
     * @param upgradeStrategy
     * @return
     */
    int addAndBindDevice(UpgeadeStrategyDevice upgradeStrategy);

    /**
     * 根据策略id获取升级包
     * @param id
     * @return
     */
    UpgradeFirmware getUpgradeFileByStrategyId(Long id);
}
